import React from 'react';
import { Typography } from 'antd';
import { AxTypographyProps, AxParagraphProps, AxTextProps } from './data.d';

const { Paragraph, Text } = Typography;

export const AxTypography: React.FC<AxTypographyProps> = props => {
  return <Typography {...props} />;
};

export const AxParagraph: React.FC<AxParagraphProps> = props => {
  const { children } = props;

  return (
    <Paragraph ellipsis {...props}>
      {children}
    </Paragraph>
  );
};

export const AxText: React.FC<AxTextProps> = props => {
  const { children } = props;

  return (
    <Text ellipsis {...props}>
      {children}
    </Text>
  );
};

export const AxTextForCard: React.FC<AxTextProps> = props => {
  const { children } = props;

  return (
    <div>
      <Text ellipsis {...props}>
        {children}
      </Text>
    </div>
  );
};
